.app {
  background: linear-gradient(135deg, #e8f5e9 0%, #f1f8e9 100%);
  padding: 30px;
  max-width: 800px;
  margin: 0 auto;
  font-family: 'Comic Sans MS', cursive, sans-serif;
  border-radius: 30px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  min-height: 100vh;
}

.monitor-section {
  background-color: white;
  padding: 20px;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  margin: 20px 0;
}

.monitor-title {
  text-align: center;
  color: #666;
  margin-bottom: 15px;
  font-size: 1.2em;
}

.noise-bar {
  margin: 15px 0;
  padding: 10px;
  background-color: #fff5f5;
  border-radius: 10px;
}

.bar-container {
  background-color: #ffe1e1;
  height: 20px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.bar-fill {
  background: linear-gradient(45deg, #81c784, #4caf50);
  height: 100%;
  transition: width 0.3s ease-in-out;
}

.bar-fill.warning {
  background: linear-gradient(45deg, #ff8a80, #ff5252);
}

.decibel-value {
  text-align: center;
  margin-top: 8px;
  color: #4caf50;
  font-weight: bold;
}

.timer {
  margin: 15px 0;
  padding: 10px;
  background-color: #e8f5fe;
  border-radius: 10px;
}

.timer-bar {
  background-color: #d1e8ff;
  height: 20px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.timer-fill {
  background: linear-gradient(45deg, #64b5f6, #2196f3);
  height: 100%;
  transition: width 0.3s ease-in-out;
}

.timer-value {
  text-align: center;
  margin-top: 8px;
  color: #5c6bc0;
  font-weight: bold;
}

.garden {
  background: linear-gradient(to bottom, #e8f5e9, #c8e6c9);
  min-height: 300px;  /* 增加花园高度 */
  border-radius: 20px;
  padding: 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 25px;  /* 增加植物之间的间距 */
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 30px rgba(0,0,0,0.1);
  border: 12px solid #a5d6a7;  /* 加粗边框 */
  margin: 20px 0;
}

.plant {
  font-size: 4em;  /* 增大植物大小 */
  filter: drop-shadow(0 4px 4px rgba(0,0,0,0.2));
  transition: all 0.3s ease;
  cursor: pointer;
  animation: plantBounce 1s ease-in-out infinite alternate;
}

.plant:hover {
  transform: translateY(-8px) scale(1.15);
  filter: drop-shadow(0 8px 8px rgba(0,0,0,0.3));
}

/* 添加植物轻微晃动动画 */
@keyframes plantBounce {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-5px);
  }
}

/* 美化标题 */
.garden-title {
  text-align: center;
  font-size: 1.8em;
  color: #2e7d32;
  margin: 25px 0;
  text-shadow: 0 2px 4px rgba(0,0,0,0.1);
  font-weight: bold;
}

.alert {
  position: fixed;
  top: 20px;
  right: 20px;
  background-color: #ff4444;
  color: white;
  padding: 10px 20px;
  border-radius: 5px;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

.header {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 10px;
}

.header button {
  background-color: #ff9eb3;
  border: none;
  padding: 8px 16px;
  border-radius: 20px;
  color: white;
  font-size: 16px;
  cursor: pointer;
  box-shadow: 0 3px 6px rgba(0,0,0,0.1);
  transition: transform 0.2s;
}

.header button:hover {
  transform: translateY(-2px);
  background-color: #ff8da3;
}

.settings-dialog {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(5px);
}

.settings-content {
  background: white;
  padding: 25px;
  border-radius: 20px;
  min-width: 300px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.settings-content h2 {
  color: #4caf50;
  text-align: center;
  margin-bottom: 20px;
}

.form-group {
  margin: 15px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.form-group input {
  width: 100px;
  padding: 8px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 16px;
}

.dialog-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

button {
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  background: #4CAF50;
  color: white;
  cursor: pointer;
}

button:hover {
  background: #45a049;
}